Skip to content

Conversation

@3405691582
Copy link
Collaborator

I suspect there may be either some lack of cleanup or race that occurs when executing the tests, since the error mentions "An instance group already exists with name: cvd". I don't want to plumb too deeply into figuring out exactly why this happens; instead, just generate a quasi-unique group name based on the time and this way they should likely not collide any more.

@3405691582 3405691582 requested a review from ser-io January 8, 2026 16:13
I suspect there may be either some lack of cleanup or race that occurs
when executing the tests, since the error mentions "An instance group
already exists with name: cvd". I don't want to plumb too deeply
into figuring out exactly why this happens; instead, just generate
a quasi-unique group name based on the time and this way they should
likely not collide any more.
Copy link
Member

@ser-io ser-io left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's fail if there's a cvd instance already created when the tests is about to run. The e2e test creating instances were implemented to be run in clean containers https://github.com/google/android-cuttlefish/blob/main/.github/actions/run-cw-sharded-e2e-test/action.yaml#L72 each of them.

@ser-io
Copy link
Member

ser-io commented Jan 9, 2026

Explaining the group name collision error:

When flaky = True was added to snapshot_test_test bazel rule in #1934. Bazel started attempting the same test 3 times, as the test is known to be flaky, when the first attempt fails due the flakiness of cvd suspend with error: cvd suspend failed: execution of "/usr/bin/cvd" command with args ["/usr/bin/cvd" "--group_name=cvd" "--instance_name=1" "suspend"] failed: exit status 255, the next two attempt would fail in a deterministic way with error: An instance group already exists with name: cvd because the group was already taken in the first attempt and the test is meant to be run in a brand new environment every time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants